@extends('goods.base.index')


@section('content')
<!-- Content>
<!-- Messages Drawer -->
	 <div class="block-area" id="text-input">
                <h3 class="block-title">Text Input</h3>
                <form action='/admin/goods/{{ $goods->id }}' method='post'>
                    <input type='hidden' name='_token' value='{{ csrf_token() }}'>
					<input type='hidden' name='_method' value="PUT">
                     <div class="row">
                        <div class="col-lg-8">
                            <input name='sname' type="text" class="form-control m-b-10" placeholder="商品名称" value="{{$goods->sname}}">
                        </div>
                        <div class="col-lg-8">
                             <select class="form-control input-sm m-b-10" name='type'>
                                <option>---商品类别---</option>
                                <option value='1' {{ $goods->type==1?"selected":"" }}>手机</option>
                                <option value='2' {{ $goods->type==2?"selected":"" }}>电脑</option>
                            </select>
                        </div>
                        <div class="col-lg-8">
                            <input name='price' type="text" class="form-control m-b-10" placeholder="商品价格" value="{{ $goods->price }}">
                        </div>
                        <div class="col-lg-8">
                            <input name='pic' type="text" class="form-control m-b-10" placeholder="展示图" value="{{ $goods->pic }}">
                        </div>
                        <div class="col-lg-8">
                            <input name='bigpic' type="text" class="form-control m-b-10" placeholder="大图" value="{{ $goods->bigpic }}">
                        </div>
                        <div class="col-lg-8">
                            <input name='stock' type="text" class="form-control m-b-10" placeholder="库存" value="{{ $goods->stock }}">
                        </div>
                        <div class="col-lg-8">
                            <select class="form-control input-sm m-b-10" name='hotid'>
                                <option>---推荐---</option>
                                <option value='0' {{ $goods->hotid == 0?"selected":"" }}>推荐</option>
                                <option value='1' {{ $goods->hotid == 1?"selected":"" }}>不推荐</option>
                            </select>
                        </div>
                        <div class="col-lg-8">
                            <input name='body' type="text" class="form-control m-b-10" placeholder="商品介绍" value="{{ $goods->body }}">
                        </div>
                        <div class="col-lg-8">
                            <select class="form-control input-sm m-b-10" name='under'>
                                <option>---商品状态---</option>
                                <option value='0' {{ $goods->under == 0?"selected":"" }}>下架</option>
                                <option value='1' {{ $goods->under == 1?"selected":"" }}>上架</option>
                            </select>
                        </div>
                        <div class="col-lg-8">
                           <select class="form-control input-sm m-b-10" name='bin'>
                                <option>---回收站---</option>
                                <option value='0' {{ $goods->bin == 0?'selected':'' }}>正常</option>
                                <option value='1' {{ $goods->bin == 1?"selected":"" }}>删除</option>
                            </select>
                        </div>
                        <div class="col-lg-8">
                            <input name='Hlevel' type="text" class="form-control m-b-10" placeholder="热度" value="{{ $goods->Hlevel }}">
                        </div>
                        <div class="col-lg-8">
                            <input name='discount' type="text" class="form-control m-b-10" placeholder="折扣" value="{{ $goods->discount }}">
                        </div>
                        <div class='row'>
                            <div class="col-lg-12">
                                <input type='submit' class='btn' value='修改'>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </form>
                <!-- 显示验证规则失败时的信息 -->
                @if (count($errors) > 0)
                    <div class="alert alert-danger">
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif
    </div>
@stop